using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace ICP_MS.Plugin.Register;

public class FormLicense : Form
{
	private IContainer components = null;

	private Label label1;

	private TextBox txtInCode;

	private Label label2;

	private TextBox txtLicense;

	private Button btnOK;

	public string TxtInCode
	{
		get
		{
			return txtInCode.Text;
		}
		set
		{
			txtInCode.Text = value;
		}
	}

	public string TxtLicense
	{
		get
		{
			return txtLicense.Text;
		}
		set
		{
			txtLicense.Text = value;
		}
	}

	public FormLicense()
	{
		InitializeComponent();
	}

	private void btnOK_Click(object sender, EventArgs e)
	{
		base.DialogResult = DialogResult.OK;
	}

	private void FormLicense_Load(object sender, EventArgs e)
	{
		ApplyResources();
	}

	private void ApplyResources()
	{
		label1.Text = Lang.Txt("FormLicense.Label.InstrumentID.Text");
		label2.Text = Lang.Txt("FormLicense.Label.License.Text ");
		Text = Lang.Txt("FormLicense.Title.Text");
		btnOK.Text = Lang.Txt("FormLicense.Button.Text");
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ICP_MS.Plugin.Register.FormLicense));
		this.label1 = new System.Windows.Forms.Label();
		this.txtInCode = new System.Windows.Forms.TextBox();
		this.label2 = new System.Windows.Forms.Label();
		this.txtLicense = new System.Windows.Forms.TextBox();
		this.btnOK = new System.Windows.Forms.Button();
		base.SuspendLayout();
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(13, 25);
		this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(116, 20);
		this.label1.TabIndex = 0;
		this.label1.Text = "设备ID(8位数字)";
		this.txtInCode.Location = new System.Drawing.Point(16, 60);
		this.txtInCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
		this.txtInCode.Name = "txtInCode";
		this.txtInCode.Size = new System.Drawing.Size(428, 26);
		this.txtInCode.TabIndex = 1;
		this.label2.AutoSize = true;
		this.label2.Location = new System.Drawing.Point(13, 105);
		this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label2.Name = "label2";
		this.label2.Size = new System.Drawing.Size(197, 20);
		this.label2.TabIndex = 0;
		this.label2.Text = "序列号(XXXXXXX-XXXXXXX-...)";
		this.txtLicense.Location = new System.Drawing.Point(16, 140);
		this.txtLicense.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
		this.txtLicense.Name = "txtLicense";
		this.txtLicense.Size = new System.Drawing.Size(428, 26);
		this.txtLicense.TabIndex = 1;
		this.btnOK.Location = new System.Drawing.Point(184, 176);
		this.btnOK.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
		this.btnOK.Name = "btnOK";
		this.btnOK.Size = new System.Drawing.Size(76, 35);
		this.btnOK.TabIndex = 2;
		this.btnOK.Text = "确定";
		this.btnOK.UseVisualStyleBackColor = true;
		this.btnOK.Click += new System.EventHandler(btnOK_Click);
		base.AutoScaleDimensions = new System.Drawing.SizeF(8f, 20f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(462, 220);
		base.Controls.Add(this.btnOK);
		base.Controls.Add(this.txtLicense);
		base.Controls.Add(this.label2);
		base.Controls.Add(this.txtInCode);
		base.Controls.Add(this.label1);
		this.Font = new System.Drawing.Font("Arial Narrow", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
		base.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
		base.Name = "FormLicense";
		base.ShowIcon = false;
		this.Text = "序列号认证";
		base.Load += new System.EventHandler(FormLicense_Load);
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
